package com.hdd.biz.account.controller;


import com.hdd.biz.app.dto.AppResponse;
import com.hdd.biz.app.dto.PayRequest;
import com.hdd.utils.wx.WxMiniProgramCheckUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 * 账户表 前端控制器
 * </p>
 *
 * @author fang
 * @since 2021-02-23
 */
@RestController
@RequestMapping("/account")
@Api(value = "账户模块",tags = {"账户模块"})
@CrossOrigin(origins = "*",maxAge = 3600)
@Slf4j
public class AccountController {

    @Autowired
    private WxMiniProgramCheckUtil wxMiniProgramCheckUtil;
//
//    @PostMapping("/test")
//    @ApiOperation(value = "微信打赏" ,notes = "")
//    public AppResponse rewardAuthorByWX(@Valid @RequestBody PayRequest request ) throws Exception {
//        AppResponse appResponse  = new AppResponse();
//        WxMiniProgramCheckUtil.CheckResult checkResult = wxMiniProgramCheckUtil.msgSecCheck("法轮功");
//        log.info("checkResult",checkResult.toString());
//        return appResponse;
//    }
//
//    @PostMapping("/test2")
//    @ApiOperation(value = "微信打赏2" ,notes = "")
//    public AppResponse rewardAuthorByWX2(@Valid @RequestBody PayRequest request ) throws Exception {
//        AppResponse appResponse  = new AppResponse();
//        WxMiniProgramCheckUtil.CheckResult checkResult = wxMiniProgramCheckUtil.imgSecCheck2("https://qiniu.17huaduoduo.com/FuQB0rJUF1tvgFElrk1Xe6ieQ8YI");
//        log.info("checkResult",checkResult.toString());
//        return appResponse;
//    }

}

